import service from "../utils/request";

const now = new Date().getTime();
// 获取验证码
export function getCodeInfo(currdatetime:any) {
    return service.get(`/nttboot/sys/randomImage/${currdatetime}?_t=${now}`);
}

//登录
export function loginApi(params:any) {
    return service.post(`/api/sys/mLogin`,params);
}

// 退出登录
export function logoutApi() {
    return service.post(`/nttboot/sys/logout`);
}

// 获取用户信息
export function getUserInfo() {
    return service.get(`/nttboot/sys/user/getUserInfo?_t=${now}`);
}

// 获取用户权限
export function getUserPermissionByToken() {
    return service.get(`/nttboot/sys/permission/getUserPermissionByToken`);
}
  
// 上传视频
export const Upload = (params: any) => {
  return service.post("/api/v1/videoRecords/upload", params, {
    headers: {
      // 浏览器会自动设置正确的 Content-Type（含 multipart 边界）
      "Content-Type": "multipart/form-data",
    },
  });
};

// 获取视频审核详情
export const Details = (params: any) => {
  return service.get("/api/v1/videoRecords/detail/" + params.videoId);
};

// 获取视频审核任务列表
export const AuditList = (params: any) => {
  return service.post("/api/v1/videoRecords/list", params);
};



